home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 1220 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: gate.net!pslfl2-13
  2. From: bhutto@gate.net (William Hutto)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Strcat Doesn't work for this?
  5. Date: 12 Jan 1996 08:16:23 GMT
  6. Organization: CyberGate, Inc.
  7. Message-ID: <4d55cn$228c@news.gate.net>
  8. References: <Pine.SOL.3.91.960111151925.25068C-100000@lore.cs.purdue.edu>
  9. NNTP-Posting-Host: pslfl2-13.gate.net
  10. X-Newsreader: News Xpress Version 1.0 Beta #4
  11.  
  12. In article <Pine.SOL.3.91.960111151925.25068C-100000@lore.cs.purdue.edu>,
  13.    ** Craig Cook ** <cookca@cs.purdue.edu> wrote:
  14. >Here is my excerpt of code in question:
  15. >
  16. >
  17. >Putword(int w, char *imageChar)
  18. >{
  19. >        w = (w & 0xff);
  20. >        strcat( imageChar, (const char *)w );
  21.  
  22. Given an example:
  23. w==0x0020    
  24.     w=(w & 0xff);
  25. w==0x0020;
  26.  
  27.     strcat( imgChar, (const char *)0x20);    
  28.  
  29. In this instance you're appending the string at address 0x20 to imgChar. Is 
  30. that what you wanted?
  31.  
  32. >
  33. >}
  34. >
  35. >Why does it core dump?  It should work right?
  36. >
  37. >Craig                                 
  38. >                              ,,,
  39. >                             (o o)
  40. >-------------=={{ cookca@.cs.purdue.edu}}==-----------ooO-(_)-Ooo-------
  41. >
  42.  
  43.  
  44. "Whatcha got on?...Your mind?"
  45.